export interface ApiResponse<T> {
  code: number;
  success: boolean;
  message: string;
  data?: T;
}

export interface AddListData {
  completed: boolean;
  createdAt: string;
  description: string;
  dueDate: string;
  _id: string;
  priority: string;
  title: string;
  updatedAt: string;
  user: string;
}

export interface GetListsData {
  pagination: Pagination;
  todos: TodoData[];
}

export interface Pagination {
  currentPage: number;
  hasNext: boolean;
  hasPrev: boolean;
  totalItems: number;
  totalPages: number;
}

export interface TodoData {
  completed: boolean;
  createdAt: string;
  description?: string;
  dueDate?: null | string;
  _id: string;
  priority?: string;
  title: string;
  updatedAt: string;
  user: string;
}

export interface getListsParams {
  completed?: boolean;
  limit?: number;
  page?: number;
  priority?: string;
  search?: string;
}

export interface addTodoData {
  title: string,
  description?: string,
  priority?: "high" | 'low',
  dueDate?: string
}
